/* $Header: valve_ui.h,v 2.2 01/10/02 10:30:46 przybyls Exp $ */

/***********************************************************************/
/* INCLUDE FILE NAME:  valve_ui.h                                      */
/* ==================                                                  */
/*                                                                     */
/* Author:  Lesley Freed                                               */
/*                                                                     */
/* COMMENT:  Defines the function prototypes for the valve user        */
/*           interface functions for the user-controllable valves      */
/*           ( valves 1-8 ).                                           */
/*                                                                     */
/***********************************************************************/

#ifndef VLV_UI_H
#define VLV_UI_H

/*****************************/
/*   IFDEFS                  */
/*****************************/


/*****************************/
/*   SYMBOLIC CONSTANTS      */
/*****************************/


/*****************************/
/*   MACROS                  */
/*****************************/


/*****************************/
/*   TYPEDEFS                */
/*****************************/


/*****************************/
/*   FUNCTION PROTOTYPES     */
/*****************************/


VALVE_TYPE      GetValveType( U_INT8 valve );
INT32           GetValveLoopVolume( U_INT8 valve );
INT32           GetValveLoadTime( U_INT8 valve );
INT32           GetValveInjectTime( U_INT8 valve );
INT32           GetValveStreamNo (void);
INT32           GetValveBcdInput (void);
INT32           GetMultiTime (void);
INT32           GetGasSamplingValve1(void);
INT32           GetGasSamplingValve2(void);
VALVE_POSITION  GetValveInlet( U_INT8 valve );
ON_OFF          GetInvertBcd (void);
ON_OFF          GetValveState (U_INT8 valve);
ON_OFF          GetValveSetpt (U_INT8 valve);
BIT8            HaveMultiposValve (void);
BIT8            HaveRemoteStartValve (void);
BIT8            CheckForSettableValve( void );

UI_ERR          SetValveType( U_INT8 valve, VALVE_TYPE type );
UI_ERR          SetValveLoopVolume( U_INT8 valve, INT32 volume );
UI_ERR          SetValveLoadTime( U_INT8 valve, INT32 time );
UI_ERR          SetValveInjectTime( U_INT8 valve, INT32 time );
UI_ERR          SetValveStreamNo (INT32 num);
UI_ERR          CheckValveStreamNo (INT32 num);
UI_ERR          SetMultiTime (INT32 num);
UI_ERR          SetValveInlet( U_INT8 valve, VALVE_POSITION inlet );
UI_ERR          SetInvertBcd (ON_OFF onoff);
UI_ERR          SetValveState (ON_OFF state, U_INT8 valve);

void            MultiReady (void);
void            MultiNotReady (void);
BIT8            MultiIsReady (void);
void            Gsv1Ready (void);
void            Gsv2Ready (void);
void            Gsv1NotReady (void);
void            Gsv2NotReady (void);

void            RTTSetMultiValve (INT32 stream);
void            ResetValveState (void);
void            RTTSetValve1State (INT32 state);
void            RTTSetValve2State (INT32 state);
void            RTTSetValve3State (INT32 state);
void            RTTSetValve4State (INT32 state);
void            RTTSetValve5State (INT32 state);
void            RTTSetValve6State (INT32 state);
void            RTTSetRelay1State (INT32 state);
void            RTTSetRelay2State (INT32 state);

void            CTSetValve1State (INT32 state);
void            CTSetValve2State (INT32 state);
void            CTSetValve3State (INT32 state);
void            CTSetValve4State (INT32 state);
void            CTSetValve5State (INT32 state);
void            CTSetValve6State (INT32 state);
void            CTSetRelay1State (INT32 state);
void            CTSetRelay2State (INT32 state);

#endif
